using Bean.ProductService.KN;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Bean.PolicyProductBackEnd.Handler;

public class JYCSKNB2MTSHandler : BackgroundService
{
    public ILogger<JYCSKNB2MTSHandler> _Logger;
    private readonly JYCSKNB2MTSService _service;

    /// <summary>
    /// </summary>
    /// <param name="logger"></param>
    public JYCSKNB2MTSHandler(ILogger<JYCSKNB2MTSHandler> logger, JYCSKNB2MTSService service)
    {
        _Logger = logger;
        _service = service;
    }

    /// <summary>
    ///     获取产品政策队列
    /// </summary>
    /// <param name="stoppingToken"></param>
    /// <exception cref="NotImplementedException"></exception>
    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    {
        Console.WriteLine("111");
        await _service.ExecutePolicyAsync();
    }
}